/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2021-10-27     RT-Thread    first version
 */

#include <rtdevice.h>
#include <rtthread.h>
#include <board.h>
#include <test/test.h>
#include "stm32f4xx_hal.h"
//#include "main.h"



#define DBG_TAG "main"
#define DBG_LVL DBG_LOG
#include <rtdbg.h>


//#define RT_APP_PART_ADDR  0x080A0000

/**
 * Function    ota_app_vtor_reconfig
 * Description Set Vector Table base location to the start addr of app(RT_APP_PART_ADDR).
*/
//static int ota_app_vtor_reconfig(void)
//{
//    #define NVIC_VTOR_MASK   0x3FFFFF80
//    /* Set the Vector Table base location by user application firmware definition */
//    SCB->VTOR = RT_APP_PART_ADDR & NVIC_VTOR_MASK;
//
//    return 0;
//}
//INIT_BOARD_EXPORT(ota_app_vtor_reconfig);

#define LED_PIN     69
int main(void)
{
    int count = 1;

    Init_Led();
//    demo_init();
//    Init_LedDemo();

    while (count++)
    {
//        LOG_D("Hello RT-Thread!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
        rt_pin_write(LED_PIN, !rt_pin_read(LED_PIN));
        rt_thread_mdelay(300);
    }

    return RT_EOK;
}
